package com.priox.sigar.infraestructura.persistence.jpa.sigar;

import com.googlecode.genericdao.search.Search;
import com.mm.support.jpa.BaseDAO;
import com.priox.sigar.domain.model.Sociedad;
import com.priox.sigar.domain.model.SociedadRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;


/**
 * User: aglwkrs
 * Date: 30/11/11
 */
@Repository
public class SociedadRepositoryImpl extends BaseDAO<Sociedad, String> implements SociedadRepository {

    private final static Logger logger = LoggerFactory.getLogger(SociedadRepositoryImpl.class);



    public List<Sociedad> findByIds(List<String> ids) {
        if (ids.isEmpty()) return new ArrayList<Sociedad>();
        Search s = new Search();
        s.addFilterIn("sociedadId", ids);
        return search(s);
    }

}
